package com.app.ctzoverseas.network.http

import com.android.base_network.RetrofitClient
import com.cardetective.shopcar.network.api.AddressApi
import com.cardetective.shopcar.network.api.GoodsApi
import com.cardetective.shopcar.network.api.LoginApi
import com.cardetective.shopcar.network.api.OrderApi
import com.cardetective.shopcar.network.model.AddCarPost
import com.cardetective.shopcar.network.model.BindMobilePost
import com.cardetective.shopcar.network.model.LoginPost

class OrderNetwork {

    private val mOrderApi by lazy { RetrofitClient.getInstance().createApi(OrderApi::class.java) }

    fun getOrderList(tag:String,pageNum:Int,pageSize:Int) = mOrderApi.getOrderList(tag,pageNum,pageSize)
    fun getOrderDetail(orderSn:String) = mOrderApi.getOrderDetail(orderSn)
    fun getRefundReasons() = mOrderApi.getRefundReasons()
    fun submitRefundReasons(orderSn: String) = mOrderApi.submitRefundReasons(orderSn)

    companion object {
        @Volatile
        private var netWork: OrderNetwork? = null

        fun getInstance() = netWork ?: synchronized(this) {
            netWork ?: OrderNetwork().also { netWork = it }
        }
    }
}